package com.igeek.boot.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author fengqq
 * @Description TODO
 * @Date 2024/8/21  9:56
 */
@Configuration
public class WebMVCConfig implements WebMvcConfigurer {
    //配置静态资源的映射  搭建本地服务器映射
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        WebMvcConfigurer.super.addResourceHandlers(registry);
        registry.addResourceHandler("/pic/**")
                .addResourceLocations("file:/D:\\133java\\1.SpringBoot\\pic\\");
    }
}
